/*
 * File: foc.h
 *
 * Code generated for Simulink model 'foc'.
 *
 * Model version                  : 1.9
 * Simulink Coder version         : 23.2 (R2023b) 01-Aug-2023
 * C/C++ source code generated on : Wed Dec  6 11:37:47 2023
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: STMicroelectronics->ST10/Super10
 * Code generation objectives:
 *    1. Execution efficiency
 *    2. RAM efficiency
 * Validation result: Not run
 */

#ifndef RTW_HEADER_foc_h_
#define RTW_HEADER_foc_h_
#ifndef foc_COMMON_INCLUDES_
#define foc_COMMON_INCLUDES_
#include "rtwtypes.h"
#include "rtw_continuous.h"
#include "rtw_solver.h"
#endif                                 /* foc_COMMON_INCLUDES_ */

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
#define rtmGetErrorStatus(rtm)         ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
#define rtmSetErrorStatus(rtm, val)    ((rtm)->errorStatus = (val))
#endif

/* Forward declaration for rtModel */
typedef struct tag_RTM RT_MODEL;

/* Constant parameters (default storage) */
typedef struct {
  /* Expression: dlgSett.sin_table
   * Referenced by: '<S5>/sine_table_values'
   */
  real_T sine_table_values_Value[1002];
} ConstP;

/* External inputs (root inport signals with default storage) */
typedef struct {
  real_T reg;                          /* '<Root>/REG' */
  real_T q;                            /* '<Root>/LQ' */
  real_T d;                            /* '<Root>/LD' */
} ExtU;

/* External outputs (root outports fed by signals with default storage) */
typedef struct {
  real_T UV[3];                        /* '<Root>/UV' */
} ExtY;

/* Real-time Model Data Structure */
struct tag_RTM {
  const char_T * volatile errorStatus;
};

/* External inputs (root inport signals with default storage) */
extern ExtU rtU;

/* External outputs (root outports fed by signals with default storage) */
extern ExtY rtY;

/* Constant parameters (default storage) */
extern const ConstP rtConstP;

/* Model entry point functions */
extern void foc_initialize(void);
extern void foc_step(void);

/* Real-time Model object */
extern RT_MODEL *const rtM;

/*-
 * These blocks were eliminated from the model due to optimizations:
 *
 * Block '<S4>/Data Type Duplicate' : Unused code path elimination
 * Block '<S5>/Data Type Duplicate' : Unused code path elimination
 * Block '<S5>/Data Type Propagation' : Unused code path elimination
 * Block '<S10>/Data Type Duplicate' : Unused code path elimination
 * Block '<S11>/Data Type Duplicate' : Unused code path elimination
 * Block '<S6>/Data Type Duplicate' : Unused code path elimination
 * Block '<S6>/Data Type Duplicate1' : Unused code path elimination
 * Block '<Root>/Signal Conversion' : Eliminate redundant signal conversion block
 * Block '<S4>/Ka' : Eliminated nontunable gain of 1
 * Block '<S4>/Kb' : Eliminated nontunable gain of 1
 * Block '<S4>/Kc' : Eliminated nontunable gain of 1
 * Block '<S5>/Get_FractionVal' : Eliminate redundant data type conversion
 * Block '<S8>/convert_pu' : Eliminated nontunable gain of 1
 * Block '<S12>/Offset' : Unused code path elimination
 * Block '<S12>/Unary_Minus' : Unused code path elimination
 */

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'foc'
 * '<S1>'   : 'foc/Subsystem'
 * '<S2>'   : 'foc/Subsystem/Inverse Clarke Transform'
 * '<S3>'   : 'foc/Subsystem/Inverse Park Transform'
 * '<S4>'   : 'foc/Subsystem/Inverse Clarke Transform/Two phase input'
 * '<S5>'   : 'foc/Subsystem/Inverse Park Transform/Sine Cosine'
 * '<S6>'   : 'foc/Subsystem/Inverse Park Transform/Two inputs CRL'
 * '<S7>'   : 'foc/Subsystem/Inverse Park Transform/Sine Cosine/Interpolation'
 * '<S8>'   : 'foc/Subsystem/Inverse Park Transform/Sine Cosine/WrapUp'
 * '<S9>'   : 'foc/Subsystem/Inverse Park Transform/Sine Cosine/WrapUp/Compare To Zero'
 * '<S10>'  : 'foc/Subsystem/Inverse Park Transform/Sine Cosine/WrapUp/If Action Subsystem'
 * '<S11>'  : 'foc/Subsystem/Inverse Park Transform/Sine Cosine/WrapUp/If Action Subsystem1'
 * '<S12>'  : 'foc/Subsystem/Inverse Park Transform/Two inputs CRL/Switch_Axis'
 */
#endif                                 /* RTW_HEADER_foc_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
